package com.fanco.learn_datastruct_leetcode.designpattern.strategy.improve;

public abstract class Duck {

	FlyBehavior flyBehavior;
	/// 其他属性 - 》 策略接口

	public Duck() {

	}

	public abstract void display();//��ʾѼ����Ϣ

	public void quack() {
		System.out.println("Ѽ�Ӹ¸½�~~");
	}

	public void swim() {
		System.out.println("Ѽ�ӻ���Ӿ~~");
	}

	public void fly() {
		if (flyBehavior != null) {
			flyBehavior.fly();
		}
	}

}
